<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>list courses</title>
</head>
<body>

<table width="100%" height="100%" align="center">
<tr>
<td width="100%" height="100%" align="center" valign="middle"  class="tab0">
</td>
<td width="800" align="center" valign="top" class="tab1">
<div id="feedback">
		<span class="color color-1"></span>
		<span class="color color-2"></span>
		<span class="color color-3"></span>
		<span class="color color-4"></span>
		<span class="color color-5"></span>   
		<div class="section"> 	
<table width="100%" height="100%" class="sortable" cellspacing="4" >
	<tr>
		<td width="20">Id</td>
		<td width="200">Tytuł szkolenia</td>
		<td>Ostatnia aktywność</td>
		<td width="180">Przeczytanych stron</td>
		<td width="180">Test wstępny</td>
	</tr>
	<c:forEach items="${userCourseInfoList}" var="course">
		<tr>
			<td>${course.course.course_id}</td>
			<td>${course.course.title}</td>
			<td>${course.lastattempt}</td>
			<td align="left"><span class="progressBar" id="element1${course.course.course_id}">${course.pagesProgress}%</span> ${course.pages} / ${course.course.pages} </td>
			<td align="left"><span class="progressBar" id="element2${course.course.course_id}">${course.startTestProgress}%</span> ${course.starttest} / ${course.course.startTestMaxScore} </td>
			<td>
			<c:if test="${course.starttest_done=='true'}">
				<img title="Zobacz wyniki testu" style="cursor: pointer;"
				onclick="window.open('<%= request.getContextPath() %>/resources/eCoursePrint/eCoursePrint.html?course_id=${course.course.course_id}&username=${course.username}&type=PRZED','Test','width=800,height=600,scrollbars=1')"
				width="40" height="40" src="<%= request.getContextPath() %>/resources/icons/test.png" />
			</c:if>
			</td>
		</tr>
	</c:forEach>
</table>
</div>
</div>
</td>
</tr>
</table>
</body>
</html>
